package org.dizena.modules.master.zload;

import org.dizena.modules.base.service.BaseConfigService;
import org.dizena.modules.master.service.MenuService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class MasterInitRunner implements CommandLineRunner {

    @Resource
    private BaseConfigService baseConfigService;
    @Resource
    private MenuService menuService;

    @Override
    public void run(String... args) {
        menuService.initMenu();
        baseConfigService.add(ConstantMaster.AUTH_All, "user:*,client:*,master:*,*", "角色权限选择");
    }

}
